package web.ling.por

class ProviderTagLib {

    static namespace = "prov"

    def providerService

    def printNavigation = { attrs, body ->
        String currentCat = attrs.catname
        providerService.getNavigation().each { key, val ->
            out << "<li class=\"${key == currentCat ? 'selected':''}\">\n" +
                    "            <a href=\"${val}\"><i class=\"${key == currentCat ? 'icon-play':key.replaceAll(' ','_').toLowerCase()+'-icon'}\"></i> ${key}</a>\n" +
                    "        </li>"
        }
    }

}
